Salesforce UX API icon

Salesforce UX API

(0 reviews)

TMF666 - getBillingAccountById-PR

Get the current balance due and total balance due for the Master Plan Instance on a given account along with the date through which the account has been billed.

Also provides dunning information if acount is in under dunning process.

URL
http://[localhost]:[port]/sfdc-ux/v1/{businessId}/billingAccount/{id}
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit.
Expected one is "PR"-Puerto Rico
Y
idstringIdentifier of an instance of the resource. In this case it will be account numberY
nametypedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringAn identifier for the current call chain that can be used to tie together log entries on multiple layers (e.g. client, server, mainframe). This identifier must be designed to be unique across all applications.Y
targetSystemstringTo identify the target BSS. Example: csg, aria, matrixx etc
We know this is Deprecated, but this was implemented long back
Y
Query Param
nametypedescriptionrequired
accountRelationship.account.idstringThe client-defined identifier of the Master Plan Instance.Y
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/aria-account-management-sys/v1/PR/billingAccount/21517658-21518862?accountRelationship.account.id=21517658-21518862' \
--header 'X-Correlation-ID: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92cDD' \
--header 'client_id: 784c9a6dd7ae49768816cab57fcf1fa1' \
--header 'client_secret: 187b259EB77441babbF611d2646C670d'\
--header 'targetSystem: Aria'

Possible response success

This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.

[ 200 ]

OK - retrieve request processed successfully, response body contains an entity corresponding to the requested resource.

{
    "@type": "BillingAccount",
    "accountBalance": [
        {
            "balanceType": "TotalOutstandingBalance",
            "amount": {
                "unit": "usd",
                "value": "0"
            },
            "validFor": {
                "endDateTime": "2023-08-05T00:00:00:000Z"
            }
        },
        {
            "balanceType": "CurrentOutstandingBalance",
            "amount": {
                "unit": "usd",
                "value": "0"
            }
        },
        {
            "balanceType": "Credit",
            "amount": {
                "unit": "usd",
                "value": "-17"
            }
        }
    ],
    "characteristic": [
        {
            "value": "Medium_Risk_Customers",
            "name": "riskProfileId"
        },
        {
            "value": "1",
            "name": "dunning_step"
        },
        {
            "value": 0,
            "name": "dunningState"
        },
        {
            "value": "2024-04-30",
            "name": "dunning_degrade_date"
        }
    ]
}
Definitions
NameTypeM/ODescription
accountBalanceArrayOThe balance on the Account. It’s a response object for GET/PATCH call in Liberate. Cerillion API does not provide the data.
accountBalance.balanceTypeStringOType of the balance : LastBillAmount, TotalOutstandingBalance, OverdueBalance, CurrentBalance, DepositHeld, etc.
accountBalance.amountObjectOBalance amount
accountBalance.amount.unitStringOCurrency (ISO4217 norm uses 3 letters to define the currency). Examples: USD, EUR, ANG, XCD, SRD
accountBalance.amount.valueStringOA positive floating point number
accountBalance.validForObjectOBalance validity period
accountBalance.validFor.endDateTimeDateTimeOEnd Date and Time
@typeStringOType of account.
characteristicArrayOAny additional characteristic(s) of this billing Account
characteristics.namestringOAccount characteristic Name. Ex: 'dunningState'.
characteristics.valueAnyOAccount characteristic Value. Ex: '0'.

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400 ,
      "message" : "The request is invalid or not properly formed.",
      "description" : "The client sent too many requests and server is not able to serve them all at the moment"
    }
  ]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401 ,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }
  ]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{

      "code" : 404,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method post not allowed for : /{businessId}/billingAccount/{id}"
        }]
}
[ 429 ]

Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.

{
  "errors" : [{

      "code" : 429,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "The request failed due to an internal error.",
      "description": ""
    }
  ]
}
[ 501]
{
   "errors":[
      {
         "code":501,
         "message":"Not implemented",
         "description":"Operation GET /billingAccount/{id} for Business Id: XXXX not implemented"
      }
   ]
}
[ 503 ]

Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.


Reviews